<!--suppress ALL -->
<script src="/static/js/amazeui.datatables.min.js"></script>
<script src="/static/js/dataTables.responsive.min.js"></script>
<script src="/static/js/amazeui.page.js"></script>
<script src="/static/js/layer/layer.js"></script>
<!--<script src="/static/js/app.js"></script>-->
<!--<script src="/static/js/echarts.min.js"></script>-->
<script>
    var limit = {{.limit}};
    if ({{.total}} =='1')
    {
        sendajaxdata(limit, 0);
    }
    function sendajaxdata(limit, offset) {
        var progress = $.AMUI.progress;
        progress.start();
        offset = limit * (offset - 1 );

        var html = [];
        $.get("/nodejson?limit=" + limit + "&offset=" + offset, function (data) {
            for (var i = 0; i < data.length; i++) {
                html += '<tr class="gradeX">';
                html += '<td>Amaze UI 模式窗口</td>';
                html += '<td>' + data[i].Id + '</td>';
                html += '<td>2016-09-26</td>';
                html += '<td>';
                html += '<div class="tpl-table-black-operation">';
                html += '<a href="javascript:;">';
                html += '<i class="am-icon-pencil"></i> 编辑 </a>';
                html += '<a href="javascript:;" class="tpl-table-black-operation-del">';
                html += '<i class="am-icon-trash"></i> 删除';
                html += '</a>';
                html += '</div>';
                html += '</td>';
                html += '</tr>';
            }
            $('#nodelist').html(html);
            progress.done();
        });
    }

    showPage({{.total}});


    $('.create_node').on('click', function () {
        layer.open({
            type: 2,
            title: '',
//            maxmin: true,
            shadeClose: true, //点击遮罩关闭层
            area:  ['900px', '700px'],
            content: '/nodemodal',
        });
    });
</script>